Subject: Re: [amos-list] Amcaf.lha??? Sam Raw???
From: Andrew Crowe <[email-masked]>
To: [email-masked]
Date: Sun, 20 Jun 1999 19:31:21 +0000

From: Andrew Crowe <[email-masked]>

Hi Everybody,

> 2) Sam Raw ain't doing it...
> even copying the text str8 out of the manual Sam Raw just plays garbage.
> I know I am loading the samples right because loading one then saving it
> to ram: then reloading in a MOD prog. works.
> I have:
> reserve as work 10,120000
> bload "ram:sound",start(10) : rem sample is <120,000 bytes big 
> Sam Raw 15,start(10),length(10),8000
> 
> nothing, just looping noise.
> well any ideas??

> I want to use Sam Raw so i can put the samples in Fast Ram, leaving plenty
> of Chip free for animations...

   The problem is simple : you *CAN'T *play samples from fast ram, under any
circumstances. You *must* have the sound in chip mem or the custom chips
can't access it.

   The only way to get round this is to have all the samples stored in fast
ram, and then copy it temperaraly to chip ram to play it.

Something like:

reserve as work 10,120000
bload "ram:sound",start(10) : rem sample is <120,000 bytes big 

_SAMPLAY[10,8000,15]

Procedure _SAMPLAY[bank,rate,chan]

   reserve as chip work 1000,length(bank)
   copy start(bank),start(bank)+length(bank) to start(1000)

   sam raw chan,start(bank),length(bank),rate

End proc

there you go, I've just typed it in to YAM so I'm not sure it'll work, but
you get the idea ;)

See ya.
-- 
       Manta Soft  -  Amiga programing & web page designing
          Http://mantasoft.aio.co.uk/      ICQ: 21829166
Homepage updated 24/5/99 --- Bomberman clone update & site changes
  - ------------------- Quote of the day: -------------------- -
Annie Hall (1977) remains Woody Allen's highest grossing movie,
making a $36 million profit at last count.
--The Miscellanea Digest

------------------------------------------------------------------------
Last chance to earn $5000 for your charity of choice!
http://www.onelist.com
Deadline for "GROW TO GIVE" is June 19.  See homepage for details.
------------------------------------------------------------------------
Official AMOS WWW: http://members.xoom.com/AmosFactory/front.html